<!doctype html>
<html>
<head>
    <meta charset='UTF-8'>
    <meta name='viewport' content='width=device-width initial-scale=1'>
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    <link rel="stylesheet" href="markdown.css?v=1578879025065"/>
    <title>JSR303参数验证规范测试</title>
</head>
<body>
<div class="markdown-body">
    <h1>JSR303参数验证规范测试</h1>
<h2>验证validate</h2>
<p><strong>URL:</strong> <code>http://localhost:8080/validator/test</code></p>
<p><strong>Type:</strong> <code>POST</code></p>
<p><strong>Content-Type:</strong> <code>application/json; charset=utf-8</code></p>
<p><strong>Description:</strong> 验证validate</p>
<p><strong>Request-headers:</strong></p>
<table>
<thead>
<tr><th>Header</th><th>Type</th><th>Description</th><th>Required</th><th>Since</th></tr>
</thead>
<tbody>
<tr><td>token</td><td>string</td><td>token(Global)</td><td>true</td><td>-</td></tr>
<tr><td>partnerId</td><td>string</td><td>合作方账号(Global)</td><td>true</td><td>-</td></tr>
</tbody>
</table>
<p><strong>Request-parameters:</strong></p>
<table>
<thead>
<tr><th>Parameter</th><th>Type</th><th>Description</th><th>Required</th><th>Since</th></tr>
</thead>
<tbody>
<tr><td>name</td><td>string</td><td>姓名</td><td>true</td><td>-</td></tr>
<tr><td>birthday</td><td>string</td><td>生日</td><td>true</td><td>-</td></tr>
<tr><td>age</td><td>int32</td><td>年龄</td><td>false</td><td>-</td></tr>
<tr><td>subject</td><td>object</td><td>科目</td><td>true</td><td>-</td></tr>
<tr><td>└─subjectName</td><td>string</td><td>科目名称</td><td>true</td><td>-</td></tr>
</tbody>
</table>
<p><strong>Request-example:</strong></p>
<pre><code>curl -X POST -H 'Content-Type: application/json; charset=utf-8' -i http://localhost:8080/validator/test --data '{
	&quot;name&quot;:&quot;明杰.贺&quot;,
	&quot;birthday&quot;:&quot;2020-01-13&quot;,
	&quot;age&quot;:26,
	&quot;subject&quot;:{
		&quot;subjectName&quot;:&quot;明杰.贺&quot;
	}
}
'
</code></pre>
<p><strong>Response-fields:</strong></p>
<table>
<thead>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Since</th></tr>
</thead>
<tbody>
<tr><td>success</td><td>boolean</td><td>是否成功</td><td>-</td></tr>
<tr><td>message</td><td>string</td><td>错误提示(成功succeed)</td><td>-</td></tr>
<tr><td>data</td><td>object</td><td>成功返回的数据</td><td>-</td></tr>
<tr><td>code</td><td>string</td><td>错误代码</td><td>-</td></tr>
<tr><td>timestamp</td><td>string</td><td>响应时间</td><td>-</td></tr>
</tbody>
</table>
<p><strong>Response-example:</strong></p>
<pre><code>{
	&quot;success&quot;:true,
	&quot;message&quot;:&quot;success&quot;,
	&quot;data&quot;:{
		&quot;waring&quot;:&quot;You may have used non-display generics.&quot;
	},
	&quot;code&quot;:&quot;48902&quot;,
	&quot;timestamp&quot;:&quot;2020-01-13 09:30:27&quot;
}
</code></pre>
<h2>验证通用参数</h2>
<p><strong>URL:</strong> <code>http://localhost:8080/validator/valid</code></p>
<p><strong>Type:</strong> <code>POST</code></p>
<p><strong>Content-Type:</strong> <code>application/json; charset=utf-8</code></p>
<p><strong>Description:</strong> 验证通用参数</p>
<p><strong>Request-headers:</strong></p>
<table>
<thead>
<tr><th>Header</th><th>Type</th><th>Description</th><th>Required</th><th>Since</th></tr>
</thead>
<tbody>
<tr><td>token</td><td>string</td><td>token(Global)</td><td>true</td><td>-</td></tr>
<tr><td>partnerId</td><td>string</td><td>合作方账号(Global)</td><td>true</td><td>-</td></tr>
</tbody>
</table>
<p><strong>Request-parameters:</strong></p>
<table>
<thead>
<tr><th>Parameter</th><th>Type</th><th>Description</th><th>Required</th><th>Since</th></tr>
</thead>
<tbody>
<tr><td>token</td><td>string</td><td>token</td><td>true</td><td>-</td></tr>
<tr><td>sequenceNo</td><td>string</td><td>序列号</td><td>true</td><td>-</td></tr>
<tr><td>parameter</td><td>object</td><td>No comments found.</td><td>false</td><td>-</td></tr>
<tr><td>└─numbers</td><td>number</td><td>bigInteger</td><td>false</td><td>-</td></tr>
</tbody>
</table>
<p><strong>Request-example:</strong></p>
<pre><code>curl -X POST -H 'Content-Type: application/json; charset=utf-8' -i http://localhost:8080/validator/valid --data '{
	&quot;token&quot;:&quot;2zndp5&quot;,
	&quot;sequenceNo&quot;:&quot;tbkjj9&quot;,
	&quot;parameter&quot;:{
		&quot;numbers&quot;:347
	}
}
'
</code></pre>
<p><strong>Response-fields:</strong></p>
<table>
<thead>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Since</th></tr>
</thead>
<tbody>
<tr><td>success</td><td>boolean</td><td>是否成功</td><td>-</td></tr>
<tr><td>message</td><td>string</td><td>错误提示(成功succeed)</td><td>-</td></tr>
<tr><td>data</td><td>object</td><td>成功返回的数据</td><td>-</td></tr>
<tr><td>code</td><td>string</td><td>错误代码</td><td>-</td></tr>
<tr><td>timestamp</td><td>string</td><td>响应时间</td><td>-</td></tr>
</tbody>
</table>
<p><strong>Response-example:</strong></p>
<pre><code>{
	&quot;success&quot;:true,
	&quot;message&quot;:&quot;success&quot;,
	&quot;data&quot;:{
		&quot;waring&quot;:&quot;You may have used non-display generics.&quot;
	},
	&quot;code&quot;:&quot;48902&quot;,
	&quot;timestamp&quot;:&quot;2020-01-13 09:30:27&quot;
}
</code></pre>

    <footer class="page-footer">
        <span class="copyright">Generated by smart-doc at 2020-01-13 09:30:25</span>
        <span class="footer-modification">Suggestions, contact, support and error reporting on
            <a href="https://gitee.com/sunyurepository/smart-doc" target="_blank">Gitee</a> or
            <a href="https://github.com/shalousun/smart-doc" target="_blank">Github</a>
        </span>
    </footer>
</div>
</body>
</html>